<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>js输出</title>
</head>
<body>

<div id="changeDiv" style="width: 200px;height: 100px;background-color: lightyellow"></div>



<ul>
    <li>alert弹框输出 <input type="button" value="点我" onclick="alertAction()"> </li>
    <li>修改某个元素的内容<input type="button" value="点我" onclick="changeDiv()">  </li>
    <li>在整个html页面写入值 <input type="button" value="点我" onclick="changeHtml()"> </li>
    <li>写入控制台 <input type="button" value="点我" onclick="writeConsole()"> </li>

</ul>

<script>

    function alertAction() {

        alert("alert输出");

    }

    function changeDiv() {

        var div1 = document.getElementById("changeDiv");
        div1.innerHTML = "邢伟新";

    }

    function changeHtml() {

        document.write(Date());

    }

    function writeConsole() {

        console.log("xingweixin");


    }




</script>



</body>
</html>